<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>下载页面</title>
    <script type="text/javascript">
        //确定是否下载案例
        window.onload = function () {
            document.getElementById('downloadBtn1').onclick = function () {
                if (confirm("是否下载1.jpg文件？")) {
                    //设置地址栏请求的路径
                    location.href = './download01.do?filename=1.jpg';
                }
            }
        }
    </script>
</head>
<body>
<!--http://localhost:8083/demo1208/demo1209/download.html-->
<!--http://localhost:8083/demo1208/demo1209/download01.do-->
<a href="./download01.do?filename=1.jpg">1.jpg 图片下载</a><br/>
<a href="./download01.do?filename=中文.jpg">中文.jpg 图片下载</a><br/>
<a href="./download01.do?filename=2.mp4">2.mp4 视频下载</a><br/>
<a href="./download01.do?filename=3.txt">3.txt 文本下载</a><br/>

<button id="downloadBtn1">1.jpg 图片下载</button>
</body>
</html>